<template>
  <div id="tabs">
  <Tabs class="tab" v-model="active" @click="getActive">
    <Tab v-for="(item,index) in titleinfo" :key="index" :title="item"></Tab>
</Tabs>
  </div>
</template>

<script>
import {Tab,Tabs} from 'vant';

export default {
    props:['titleinfo'],
  components:{
    Tabs,Tab
  },
  data(){
      return{
          active:0
      }
  },
  mounted(){
  },
  methods:{
      getActive(name,title){
          this.$emit('getActive',name)
      },
  }
}
</script>

<style lang="stylus" scoped>
#tabs
  >>> .tab
    position fixed
    z-index 9
</style>